package net.lesscoding.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.lesscoding.entity.storage.StorageTbl;
import org.apache.ibatis.annotations.Update;

/**
 * @author eleven
 * @date 2025/4/16 14:18
 * @apiNote
 */
public interface StorageMapper extends BaseMapper<StorageTbl> {

    @Update("update storage_tbl set count = count - #{count} where goods_code = #{goodsCode}")
    Integer deduct(String goodsCode, Integer count);
}
